#ifndef lint
static const char yysccsid[] = "@(#)yaccpar	1.9 (Berkeley) 02/21/93";
#endif

#include <stdlib.h>
#include <string.h>

#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYPATCH 20080827

#define YYEMPTY        (-1)
#define yyclearin      (yychar = YYEMPTY)
#define yyerrok        (yyerrflag = 0)
#define YYRECOVERING() (yyerrflag != 0)

/* compatibility with bison */
#ifdef YYPARSE_PARAM
/* compatibility with FreeBSD */
#ifdef YYPARSE_PARAM_TYPE
#define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
#else
#define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
#endif
#else
#define YYPARSE_DECL() yyparse(void)
#endif /* YYPARSE_PARAM */

extern int YYPARSE_DECL();

static int yygrowstack(void);
#define YYPREFIX "yy"
#line 2 "parser/owl2fsParser.y"
	#include <stdio.h>
	#include "../model/datatypes.h"
	#include "../model/globals.h"
	#include "../model/internal_kb.h"
	#include "../model/limits.h"

	#define YYSTYPE Expression
	int yylex(void);
	int yylineno;
	void yyerror(char *);
	FILE *yyin; 		/* Input for yacc parser. */

	/* for parsing conjunction*/
	int cls_exp_count;	/* number of conjuncts for conjunction */
	Concept* cls_exps[MAX_CONJUNCT_COUNT]; /* conjuncts */

	/* for parsing role composition*/
	int role_exp_count;
	Role* role_exps[MAX_ROLE_COMPOSITION_SIZE];
	char parsing_role_inclusion;

	char parsing_transitive_role;

	/* temporary solution, should be improved!*/
	char parsing_prefix;

	/* for keeping track of nested conjunctions in order to flatten them */
	enum concept_description_type  parse_stack[MAX_CONJ_EXISTS_ALTERNATION];
	int parse_stack_top = 0;
#line 64 "y.tab.c"
#define PREFIX 257
#define ONTOLOGY 258
#define IMPORT 259
#define BASEIRI 260
#define FULLIRI 261
#define IDENTIFIER 262
#define OBJECTSOMEVALUESFROM 263
#define OBJECTINTERSECTIONOF 264
#define DECLARATION 265
#define CLASS 266
#define OBJECTPROPERTY 267
#define SUBOBJECTPROPERTYOF 268
#define OBJECTPROPERTYCHAIN 269
#define TRANSITIVE_OBJECT_PROPERTY 270
#define EQUIVALENTCLASSES 271
#define SUBCLASSOF 272
#define YYERRCODE 256
static const short yylhs[] = {                           -1,
    0,    1,    1,    3,    2,    5,    5,    6,    6,    7,
    7,    4,    4,    8,    9,   13,   12,   12,   12,   14,
   15,   17,   10,   19,   19,   21,   22,   22,   20,   11,
   18,   16,   16,
};
static const short yylen[] = {                            2,
    2,    0,    7,    1,    5,    1,    1,    1,    1,    1,
    1,    1,    2,    5,    5,    1,    1,    1,    1,    6,
    5,    1,    5,    1,    1,    6,    0,    2,    1,    4,
    1,    0,    2,
};
static const short yydefred[] = {                         2,
    0,    0,    0,    0,    1,    0,    0,    4,    0,    0,
    0,    0,    0,    0,    0,    0,   12,    6,    7,    8,
    9,   10,   11,    0,    0,    0,    0,    0,    5,   13,
    3,   31,    0,   24,   22,    0,   25,    0,   16,    0,
    0,    0,   17,   18,   19,    0,    0,   29,    0,   30,
    0,    0,    0,    0,    0,   23,    0,    0,   15,   14,
   27,    0,    0,    0,   21,    0,    0,   26,   28,   33,
   20,
};
static const short yydgoto[] = {                          1,
    2,    5,    9,   16,   17,   18,   19,   20,   21,   22,
   23,   66,   43,   44,   45,   67,   34,   35,   36,   49,
   37,   64,
};
static const short yysindex[] = {                         0,
    0, -239,  -36,  -32,    0, -248, -238,    0,  -35, -255,
 -235,  -19,  -12,  -11,   -8,  -41,    0,    0,    0,    0,
    0,    0,    0,   -7, -258, -228, -254, -254,    0,    0,
    0,    0,   -3,    0,    0, -228,    0,   -2,    0,    1,
    2, -254,    0,    0,    0, -254, -228,    0,    3,    0,
 -228, -254,    4,    5, -228,    0, -254, -254,    0,    0,
    0,    6, -254,  -40,    0, -254,    7,    0,    0,    0,
    0,
};
static const short yyrindex[] = {                         0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    8,    0,    0,    8,    0,    0,    0,    0,
    0,
};
static const short yygindex[] = {                         0,
    0,    0,    0,    0,   22,    0,    0,    0,    0,    0,
    0,  -22,    0,    0,    0,  -23,  -24,    0,    0,    0,
    0,    0,
};
#define YYTABLESIZE 231
static const short yytable[] = {                         29,
   68,   38,   32,    6,   42,   46,   39,    7,   40,   41,
   33,   48,   12,    8,   13,   14,   15,    3,    4,   53,
   25,   10,   55,   54,   24,   11,   57,   26,   27,   58,
   61,   28,   32,   31,   62,   63,   47,   30,   50,   69,
   51,   52,   70,   56,   59,   60,   65,   71,   32,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
   32,    0,    0,    0,    0,    0,   12,    0,   13,   14,
   15,
};
static const short yycheck[] = {                         41,
   41,   26,  261,   40,   27,   28,  261,   40,  263,  264,
  269,   36,  268,  262,  270,  271,  272,  257,  258,   42,
   40,  260,   47,   46,  260,   61,   51,   40,   40,   52,
   55,   40,  261,   41,   57,   58,   40,   16,   41,   64,
   40,   40,   66,   41,   41,   41,   41,   41,   41,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  261,   -1,   -1,   -1,   -1,   -1,  268,   -1,  270,  271,
  272,
};
#define YYFINAL 1
#ifndef YYDEBUG
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 272
#if YYDEBUG
static const char *yyname[] = {

"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"'('","')'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'='",0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"PREFIX","ONTOLOGY",
"IMPORT","BASEIRI","FULLIRI","IDENTIFIER","OBJECTSOMEVALUESFROM",
"OBJECTINTERSECTIONOF","DECLARATION","CLASS","OBJECTPROPERTY",
"SUBOBJECTPROPERTYOF","OBJECTPROPERTYCHAIN","TRANSITIVE_OBJECT_PROPERTY",
"EQUIVALENTCLASSES","SUBCLASSOF",
};
static const char *yyrule[] = {
"$accept : ontologyDocument",
"ontologyDocument : prefixDeclaration ontology",
"prefixDeclaration :",
"prefixDeclaration : prefixDeclaration PREFIX '(' prefixName '=' BASEIRI ')'",
"prefixName : IDENTIFIER",
"ontology : ONTOLOGY '(' BASEIRI axioms ')'",
"axiom : classAxiom",
"axiom : objectPropertyAxiom",
"classAxiom : subClassAxiom",
"classAxiom : equivalentClassAxiom",
"objectPropertyAxiom : subObjectPropertyOf",
"objectPropertyAxiom : transitiveObjectProperty",
"axioms : axiom",
"axioms : axioms axiom",
"subClassAxiom : SUBCLASSOF '(' classExpression classExpression ')'",
"equivalentClassAxiom : EQUIVALENTCLASSES '(' classExpression classExpression ')'",
"class : FULLIRI",
"classExpression : class",
"classExpression : objectIntersectionOf",
"classExpression : objectSomeValuesFrom",
"objectIntersectionOf : OBJECTINTERSECTIONOF '(' classExpression classExpression classExpressions ')'",
"objectSomeValuesFrom : OBJECTSOMEVALUESFROM '(' objectPropertyExpression classExpression ')'",
"objectPropertyExpression : objectProperty",
"subObjectPropertyOf : SUBOBJECTPROPERTYOF '(' subObjectPropertyExpression superObjectPropertyExpression ')'",
"subObjectPropertyExpression : objectPropertyExpression",
"subObjectPropertyExpression : propertyExpressionChain",
"propertyExpressionChain : OBJECTPROPERTYCHAIN '(' objectPropertyExpression objectPropertyExpression objectPropertyExpressions ')'",
"objectPropertyExpressions :",
"objectPropertyExpressions : objectPropertyExpressions objectPropertyExpression",
"superObjectPropertyExpression : objectPropertyExpression",
"transitiveObjectProperty : TRANSITIVE_OBJECT_PROPERTY '(' objectPropertyExpression ')'",
"objectProperty : FULLIRI",
"classExpressions :",
"classExpressions : classExpression classExpressions",

};
#endif
#ifndef YYSTYPE
typedef int YYSTYPE;
#endif
#if YYDEBUG
#include <stdio.h>
#endif

/* define the initial stack-sizes */
#ifdef YYSTACKSIZE
#undef YYMAXDEPTH
#define YYMAXDEPTH  YYSTACKSIZE
#else
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
#define YYSTACKSIZE 500
#define YYMAXDEPTH  500
#endif
#endif

#define YYINITSTACKSIZE 500

int      yydebug;
int      yynerrs;
int      yyerrflag;
int      yychar;
short   *yyssp;
YYSTYPE *yyvsp;
YYSTYPE  yyval;
YYSTYPE  yylval;

/* variables for the parser stack */
static short   *yyss;
static short   *yysslim;
static YYSTYPE *yyvs;
static unsigned yystacksize;
#line 216 "parser/owl2fsParser.y"

void yyerror(char *s) {
	fprintf(stderr, "\nline %d: %s\n", yylineno, s);
}
#line 286 "y.tab.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
static int yygrowstack(void)
{
    int i;
    unsigned newsize;
    short *newss;
    YYSTYPE *newvs;

    if ((newsize = yystacksize) == 0)
        newsize = YYINITSTACKSIZE;
    else if (newsize >= YYMAXDEPTH)
        return -1;
    else if ((newsize *= 2) > YYMAXDEPTH)
        newsize = YYMAXDEPTH;

    i = yyssp - yyss;
    newss = (yyss != 0)
          ? (short *)realloc(yyss, newsize * sizeof(*newss))
          : (short *)malloc(newsize * sizeof(*newss));
    if (newss == 0)
        return -1;

    yyss  = newss;
    yyssp = newss + i;
    newvs = (yyvs != 0)
          ? (YYSTYPE *)realloc(yyvs, newsize * sizeof(*newvs))
          : (YYSTYPE *)malloc(newsize * sizeof(*newvs));
    if (newvs == 0)
        return -1;

    yyvs = newvs;
    yyvsp = newvs + i;
    yystacksize = newsize;
    yysslim = yyss + newsize - 1;
    return 0;
}

#define YYABORT  goto yyabort
#define YYREJECT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR  goto yyerrlab

int
YYPARSE_DECL()
{
    int yym, yyn, yystate;
#if YYDEBUG
    const char *yys;

    if ((yys = getenv("YYDEBUG")) != 0)
    {
        yyn = *yys;
        if (yyn >= '0' && yyn <= '9')
            yydebug = yyn - '0';
    }
#endif

    yynerrs = 0;
    yyerrflag = 0;
    yychar = YYEMPTY;
    yystate = 0;

    if (yyss == NULL && yygrowstack()) goto yyoverflow;
    yyssp = yyss;
    yyvsp = yyvs;
    yystate = 0;
    *yyssp = 0;

yyloop:
    if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
    if (yychar < 0)
    {
        if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
        if (yydebug)
        {
            yys = 0;
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
            if (!yys) yys = "illegal-symbol";
            printf("%sdebug: state %d, reading %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
    }
    if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: state %d, shifting to state %d\n",
                    YYPREFIX, yystate, yytable[yyn]);
#endif
        if (yyssp >= yysslim && yygrowstack())
        {
            goto yyoverflow;
        }
        yystate = yytable[yyn];
        *++yyssp = yytable[yyn];
        *++yyvsp = yylval;
        yychar = YYEMPTY;
        if (yyerrflag > 0)  --yyerrflag;
        goto yyloop;
    }
    if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
        yyn = yytable[yyn];
        goto yyreduce;
    }
    if (yyerrflag) goto yyinrecovery;

    yyerror("syntax error");

#ifdef lint
    goto yyerrlab;
#endif

yyerrlab:
    ++yynerrs;

yyinrecovery:
    if (yyerrflag < 3)
    {
        yyerrflag = 3;
        for (;;)
        {
            if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
                    yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: state %d, error recovery shifting\
 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
#endif
                if (yyssp >= yysslim && yygrowstack())
                {
                    goto yyoverflow;
                }
                yystate = yytable[yyn];
                *++yyssp = yytable[yyn];
                *++yyvsp = yylval;
                goto yyloop;
            }
            else
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: error recovery discarding state %d\n",
                            YYPREFIX, *yyssp);
#endif
                if (yyssp <= yyss) goto yyabort;
                --yyssp;
                --yyvsp;
            }
        }
    }
    else
    {
        if (yychar == 0) goto yyabort;
#if YYDEBUG
        if (yydebug)
        {
            yys = 0;
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
            if (!yys) yys = "illegal-symbol";
            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
        yychar = YYEMPTY;
        goto yyloop;
    }

yyreduce:
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
                YYPREFIX, yystate, yyn, yyrule[yyn]);
#endif
    yym = yylen[yyn];
    if (yym)
        yyval = yyvsp[1-yym];
    else
        memset(&yyval, 0, sizeof yyval);
    switch (yyn)
    {
case 14:
#line 87 "parser/owl2fsParser.y"
	{
		tbox.axioms[tbox.axiom_count] = create_subclass_axiom(yyvsp[-2].concept,yyvsp[-1].concept);
		++tbox.axiom_count;
		++subclass_ax_count;
	}
break;
case 15:
#line 95 "parser/owl2fsParser.y"
	{
		tbox.axioms[tbox.axiom_count] = create_eqclass_axiom(yyvsp[-2].concept,yyvsp[-1].concept);
		++tbox.axiom_count;
		++eqclass_ax_count;
	}
break;
case 17:
#line 111 "parser/owl2fsParser.y"
	{ yyval.concept = yyvsp[0].concept; }
break;
case 18:
#line 112 "parser/owl2fsParser.y"
	{
				 yyval.concept = yyvsp[0].concept; 
				}
break;
case 19:
#line 115 "parser/owl2fsParser.y"
	{
				 yyval.concept = yyvsp[0].concept; 
				}
break;
case 20:
#line 122 "parser/owl2fsParser.y"
	{
/*
				 if (parse_stack_top >= 2 && parse_stack[parse_stack_top - 2] == CONJUNCTION) {
				 	cls_exps[cls_exp_count++] = $3.concept;
				 	cls_exps[cls_exp_count++] = $4.concept;
					$$.concept = NULL;
				 }
				 else {
					if ($3.concept != NULL)
				 		cls_exps[cls_exp_count++] = $3.concept;
					if ($4.concept != NULL)
				 		cls_exps[cls_exp_count++] = $4.concept;
				 	$$.concept = create_conjunction(cls_exp_count,cls_exps);
				 	cls_exp_count = 0;
				 }
				 --parse_stack_top;
*/
				 	cls_exps[cls_exp_count++] = yyvsp[-3].concept;
				 	cls_exps[cls_exp_count++] = yyvsp[-2].concept;
				 	yyval.concept = create_conjunction(cls_exp_count,cls_exps);
				 	cls_exp_count = 0;
				}
break;
case 21:
#line 148 "parser/owl2fsParser.y"
	{
				 yyval.concept = create_exists(yyvsp[-2].role,yyvsp[-1].concept);
				 /* --parse_stack_top;*/
				}
break;
case 22:
#line 155 "parser/owl2fsParser.y"
	{ yyval.role = yyvsp[0].role; }
break;
case 23:
#line 159 "parser/owl2fsParser.y"
	{
		tbox.axioms[tbox.axiom_count] = create_subrole_axiom(yyvsp[-2].role,yyvsp[-1].role);
		++tbox.axiom_count;
		++subrole_ax_count;
		parsing_role_inclusion = 0;
	}
break;
case 26:
#line 173 "parser/owl2fsParser.y"
	{
		role_exps[role_exp_count++] = yyvsp[-3].role;
		role_exps[role_exp_count++] = yyvsp[-2].role;
		yyval.role = create_role_composition(role_exp_count, role_exps);
		role_exp_count = 0;
	}
break;
case 28:
#line 183 "parser/owl2fsParser.y"
	{
		role_exps[role_exp_count++] = yyvsp[0].role;
	}
break;
case 30:
#line 193 "parser/owl2fsParser.y"
	{
		printf("TransitiveObjectProperty\n");
		yyval.role = yyvsp[-1].role;
		parsing_transitive_role = 0;
	}
break;
case 33:
#line 208 "parser/owl2fsParser.y"
	{
		if (yyvsp[-1].concept != NULL)
			cls_exps[cls_exp_count++] = yyvsp[-1].concept;
	}
break;
#line 580 "y.tab.c"
    }
    yyssp -= yym;
    yystate = *yyssp;
    yyvsp -= yym;
    yym = yylhs[yyn];
    if (yystate == 0 && yym == 0)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: after reduction, shifting from state 0 to\
 state %d\n", YYPREFIX, YYFINAL);
#endif
        yystate = YYFINAL;
        *++yyssp = YYFINAL;
        *++yyvsp = yyval;
        if (yychar < 0)
        {
            if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
            if (yydebug)
            {
                yys = 0;
                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                if (!yys) yys = "illegal-symbol";
                printf("%sdebug: state %d, reading %d (%s)\n",
                        YYPREFIX, YYFINAL, yychar, yys);
            }
#endif
        }
        if (yychar == 0) goto yyaccept;
        goto yyloop;
    }
    if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
        yystate = yytable[yyn];
    else
        yystate = yydgoto[yym];
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: after reduction, shifting from state %d \
to state %d\n", YYPREFIX, *yyssp, yystate);
#endif
    if (yyssp >= yysslim && yygrowstack())
    {
        goto yyoverflow;
    }
    *++yyssp = (short) yystate;
    *++yyvsp = yyval;
    goto yyloop;

yyoverflow:
    yyerror("yacc stack overflow");

yyabort:
    return (1);

yyaccept:
    return (0);
}
